package com.cqwshzj.framework.service.impl;/**
 * @Description:
 * @Auther: Huang Zhijin
 * @Version: 1.0.0
 * @Date: 2021/4/7 09:38
 */

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.cqwshzj.common.column.JobTypeColumn;
import com.cqwshzj.framework.dao.api.JobTypeDao;
import com.cqwshzj.framework.dao.model.JobType;
import com.cqwshzj.framework.service.JobTypeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;

/**
 *
 * 〈〉
 *
 * @author Huang Zhijin
 * @create 2021/4/7
 * @since 1.0.0
 */
@Service
public class JobTypeServiceImpl implements JobTypeService {

	public static final Logger log = LoggerFactory.getLogger( JobTypeServiceImpl.class );

	@Autowired
	private JobTypeDao dao;


	@Override
	public JobType selectOneByJobType(Integer jobType) {
		Assert.notNull(jobType, "缺少参数 jobType");

		QueryWrapper<JobType> wrapper = new QueryWrapper<>();
		wrapper.eq(JobTypeColumn.JOB_TYPE, jobType );

		return dao.selectOne( wrapper );
	}



}
